<!DOCTYPE html>
<html>

    <head>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>农家真采</title>

        <!-- Bootstrap Core CSS -->
        <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    
        <style>
            .box{
                text-align: center;
                position: absolute;
                top: 40%;
                left: 0;
                width: 100%;
                transform: translate(0, -50%);
            }

            img{
                width: 100px;
                height: 100px;
            }
            .tips{
                color: #ccc;
                margin-top: 20px;
            }
        </style>
    </head>

    <body >
        <div class="box">
            <img src="/assets/img/smallapp_logo.jpg" alt="">
            <div class="tips">使用微信扫-扫打开小程序【农家直采】</div>
        </div>

        <script>
            var wsServer = 'ws://bd.xnlph.cn:9501';
var websocket = new WebSocket(wsServer);
websocket.onopen = function (evt) {
    console.log("Connected to WebSocket server.");
};

websocket.onclose = function (evt) {
    console.log("Disconnected");
};

websocket.onmessage = function (evt) {
    console.log('Retrieved data from server: ' + evt.data);
};

websocket.onerror = function (evt, e) {
    console.log('Error occured: ' + evt.data);
};
        </script>
    </body>

</html>